package square;

/**
 * A class of exceptions signaling overflow when executing calculations with doubles.
 * 
 * @version	2.0
 * @author 	Inge Gielis <inge.gielis@student.kuleuven.be>
 * @author 	Annelies Ketelslegers <annelies.ketelslegers@student.kuleuven.be>
 */

public class OverflowException extends RuntimeException
{
	/**
	 * Generated serial for the exception, which will be used when
	 * serializing the object.
	 */
	private static final long serialVersionUID = -2517734776838847257L;

	/**
	 * Constructing a new OverflowException with an empty message and no cause.
	 * 
	 * @effect	This new Illegal Argument Exception is further initialized as a new
	 * 			run-time exception involving no diagnostic message and no cause.
	 * 			| super()
	 */
	public OverflowException() {}

	/**
	 * A second constructor which adds to ability to clarify why the exception
	 * was thrown.
	 * 
	 * @param 	message
	 * 			A message to describe what exactly went wrong.
	 * @effect	This new Illegal Argument Exception is further initialized as a new
	 * 			run-time exception involving a diagnostic message.
	 * 			| super(message)
	 */
	public OverflowException(String message) {
		super(message);
	}

	/**
	 * Constructing a new OverflowException with a message and a cause of origin
	 *
	 * @param 	message
	 * 			A message to describe what exactly went wrong.
	 * @param 	cause
	 * 			The cause of origin of the exception.
	 * @effect	This new Illegal Argument Exception is further initialized as a new
	 * 			run-time exception involving a diagnostic message and a cause.
	 * 			| super(message, cause)
	 */
	public OverflowException(String message, Throwable cause) {
		super(message, cause);
	}

}
